import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import "../element_ui/components"

Window {
    width: 640
    height: 480
    visible: true
    title: "Button 组件示例"

    Column {
        spacing: 20
        anchors.centerIn: parent

        // 默认按钮
        Button {
            text: "默认按钮"
            onClicked: console.log("默认按钮被点击")
        }

        // 主要按钮
        Button {
            text: "主要按钮"
            type: "primary"
            onClicked: console.log("主要按钮被点击")
        }

        // 成功按钮
        Button {
            text: "成功按钮"
            type: "success"
            onClicked: console.log("成功按钮被点击")
        }

        // 警告按钮
        Button {
            text: "警告按钮"
            type: "warning"
            onClicked: console.log("警告按钮被点击")
        }

        // 危险按钮
        Button {
            text: "危险按钮"
            type: "danger"
            onClicked: console.log("危险按钮被点击")
        }

        // 朴素按钮
        Button {
            text: "朴素按钮"
            type: "primary"
            plain: true
            onClicked: console.log("朴素按钮被点击")
        }

        // 禁用按钮
        Button {
            text: "禁用按钮"
            type: "primary"
            enabled: false
            onClicked: console.log("禁用按钮被点击")
        }

        // 加载按钮
        Button {
            id: loadingButton
            text: "加载按钮"
            type: "primary"
            loading: true
            onClicked: console.log("加载按钮被点击")
        }

        // 圆角按钮
        Button {
            text: "圆角按钮"
            type: "primary"
            round: true
            onClicked: console.log("圆角按钮被点击")
        }
    }
}